import http from '@/utils/request'

export const list = {
  getBusinessMessages: {
    url: 'message/business',
    method: 'get'
  },
  getSystemMessages: {
    url: 'message/system',
    method: 'get'
  },
  getAnnouncements: {
    url: 'message/announcements',
    method: 'get'
  }
}

export const getBusinessMessages = params => {
  return http.request({
    ...list.getBusinessMessages,
    params
  })
}

export const getSystemMessages = params => {
  return http.request({
    ...list.getSystemMessages,
    params
  })
}

export const getAnnouncements = params => {
  return http.request({
    ...list.getAnnouncements,
    params
  })
}
